package com.free.semantic.core.impl.demo;

import com.free.semantic.core.ConceptManage;
import com.free.semantic.core.impl.BaseTest;

import com.free.semantic.req.RelationDefineGroup;
import org.junit.jupiter.api.Test;


public class Demo10_nestCase extends BaseTest {


    @Test
    public void test() {

        /**
         * 创建第一个语义模型
         */
        RelationDefineGroup group = new RelationDefineGroup();
        // relation 包含(A,B)
        defineRelation(group, "包含",
                defineItem(oneObj("A"), moreObj("B"))); //B->A=1  //代表 针对任意一个B，都可以找到 1个A与之对应

        defineRelation(group, "属性",
                defineItem(oneObj("A"), oneObj("B"))); //B->A=1  //代表 针对任意一个B，都可以找到 1个A与之对应

        //  使用包含关系 定义一个语义网络
        ConceptManage model = getConceptManage(group);
        //object 省份 城市
        object(model, "班级", "学生", "班级排名");

        createRelation(model, "包含", "班级", "学生");
        createRelation(model, "属性", "学生", "班级排名");


        ConceptManage person = getConceptManage(group);
        //object 省份 城市
        object(model, "人", "学生", "学号");


    }


}
